package com.kaluli.system.controller;

import java.security.Principal;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
public class SystemController {
	
//	@Autowired
//	private UserService userService;

	@RequestMapping("/")
	public String homeViewInfo(ModelMap map , Principal principal , HttpSession session) {
//		User user = this.userService.findByName(principal.getName());
//		session.setAttribute("user" , user);
		
		//return "forward:/notices";
		return "redirect:/index.html";
	}

	@RequestMapping("/index.html")
	public String homeView(ModelMap map) {
		map.put("home", "home");
		return "home";
	}
//
//	@RequestMapping("/login")
//	public String loginView(ModelMap map) {
//		return "login";
//	}
	
}
